<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <script src="/static/header.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/systemctl/back/">NANCAL</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">

        </div>
    </div>
</nav>
<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div class="page-header">
                <h1>修改信息</h1>
            </div>
            <form class="form-horizontal" action="/systemctl/edit_task/?id={{ press_obj.id }}" method="post">
                <div class="form-group" style="margin-bottom: 10px;">
                    <label for="press_ip" class="col-sm-3 control-label">名称</label>
                    <div class="col-sm-9" style="margin-bottom: 10px;">
                        <input type="text" class="form-control" id="press_ip" name="ip" placeholder="名字" value="{{ press_obj.name }}">
                    </div>
                    <label for="press_remark" class="col-sm-3 control-label">机器地址</label>
                    <div class="col-sm-9" style="margin-bottom: 10px;">
                            <select type="text" class="form-control" id="press_remark" name="relevance">
                            <option value ="{{ press_obj.relevance }}">{{ press_obj.relevance }}</option>
                            <option value ="no">不关联</option>
                                {% for i in cmd %}
                            <option value ="{{ i.id }}">{{ i.name }}</option>
                                {% endfor %}
                            <option value ="all">全部机器</option>
                            </select>
                    </div>
                <label for="press_remark" class="col-sm-3 control-label">关联操作</label>
                    <div class="col-sm-9" style="margin-bottom: 10px;">
                            <select type="text" class="form-control" id="press_remark" name="relevancecmd">
                            <option value ="{{ press_obj.relevancecmd }}">{{ press_obj.relevancecmd }}</option>
                            <option value ="no">不关联</option>
                                {% for i in cmd %}
                            <option value ="{{ i.id }}">{{ i.name }}</option>
                                {% endfor %}
                            </select>
                    </div>
                <label for="press_remark" class="col-sm-3 control-label">关联操作</label>
                    <div class="col-sm-9" style="margin-bottom: 10px;">
                            <select type="text" class="form-control" id="press_remark" name="relevancecmd1">
                            <option value ="{{ press_obj.relevancecmd1 }}">{{ press_obj.relevancecmd1 }}</option>
                            <option value ="no">不关联</option>
                                {% for i in cmd %}
                            <option value ="{{ i.id }}">{{ i.name }}</option>
                                {% endfor %}
                            </select>
                    </div>
                <label for="press_remark" class="col-sm-3 control-label">执行时间（小时）</label>
                    <div class="col-sm-9" style="margin-bottom: 10px;">
                            <select type="text" class="form-control" id="press_remark" name="timestart">
                               <option value ="{{ press_obj.timestart }}">每天{{ press_obj.timestart }}点执行一次</option>
                            <option value ="no">不运行</option>
                                <option value ="1">每天1点执行一次</option>
                                <option value ="2">每天2点执行一次</option>
                                <option value ="3">每天3点执行一次</option>
                                <option value ="4">每天4点执行一次</option>
                                <option value ="5">每天5点执行一次</option>
                                <option value ="6">每天6点执行一次</option>
                                <option value ="7">每天7点执行一次</option>
                                <option value ="8">每天8点执行一次</option>
                                <option value ="9">每天9点执行一次</option>
                                <option value ="10">每天10点执行一次</option>
                                <option value ="11">每天11点执行一次</option>
                                <option value ="12">每天12点执行一次</option>
                                <option value ="13">每天13点执行一次</option>
                                <option value ="14">每天14点执行一次</option>
                                <option value ="15">每天15点执行一次</option>
                                <option value ="16">每天16点执行一次</option>
                                <option value ="17">每天17点执行一次</option>
                                <option value ="18">每天18点执行一次</option>
                                <option value ="19">每天19点执行一次</option>
                                <option value ="20">每天20点执行一次</option>
                                <option value ="21">每天21点执行一次</option>
                                <option value ="22">每天22点执行一次</option>
                                <option value ="23">每天23点执行一次</option>
                                <option value ="24">每天24点执行一次</option>
                            </select>
                    </div>
                    <label for="press_remark" class="col-sm-3 control-label">备注</label>
                    <div class="col-sm-9" style="margin-bottom: 10px;">
                        <input type="text" class="form-control" id="press_remark" name="remark" placeholder="备注" value="{{ press_obj.remark }}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-10 col-sm-9">
                        <button type="submit" class="btn btn-default">确认修改</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


</body>
</html>